package main

import (
	"fmt"
	"net"
	"time"
)

func main() {
	conn, err := net.Dial("tcp", "localhost:8991")
	defer conn.Close()
	if err != nil {
		fmt.Println("连接错误", err.Error())
	}
	conn.Write([]byte("PING"))

	for i := 0; i < 10; i++ {
		method := []byte("LightBlur")
		arguments := []byte("light_0012")
		result := append(method, make([]byte, 20-len(method))...)
		result = append(result, arguments...)
		fmt.Println(string(result))
		conn.Write(result)
		time.Sleep(1000 * time.Millisecond)

	}
	conn.Write([]byte("exit"))

}
